﻿<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="~/Unit2-Session3-Detail.aspx.cs" Inherits="Unit2_Session3_Detail" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <div>
        <asp:PlaceHolder ID="plcUsers" runat="server">
            this is only for super users

        </asp:PlaceHolder>
        <asp:Button ID="btnLike" runat="server" Text="Like!" OnClick="btnLike_Click" />
    <asp:GridView runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                <ControlStyle CssClass="hotel-image" />
            </asp:ImageField>
            <asp:BoundField DataField="HotelName" HeaderText="HotelName" SortExpression="HotelName" />
            <asp:BoundField DataField="HotelDescription" HeaderText="HotelDescription" SortExpression="HotelDescription" />
        </Columns>
        </asp:GridView>
        <asp:Rating ID="Rating1" runat="server" EmptyStarCssClass="empty-star" FilledStarCssClass="filled-star" OnChanged="Rating1_Changed" StarCssClass="star" WaitingStarCssClass="empty-star">
            
        </asp:Rating>
        <asp:Rating ID="AverageRating" runat="server" EmptyStarCssClass="empty-star" FilledStarCssClass="filled-star"  StarCssClass="star" WaitingStarCssClass="empty-star">
            
        </asp:Rating>
        <br />
        <asp:GridView ID="grdTags" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="Tag" HeaderText="Tag" SortExpression="Tag" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" SelectCommand="SELECT [Tag] FROM [TagsByHotelIDView] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" SelectCommand="SELECT [HotelDescription], [Picture], [HotelName] FROM [Hotels] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        Add new tags (seperated by commas) :<br />
        <asp:CheckBoxList ID="chkTags" runat="server" DataSourceID="SqlDataSource3" DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:HotelsConnectionString %>" ProviderName="<%$ ConnectionStrings:HotelsConnectionString.ProviderName %>" SelectCommand="SELECT [Tag], [ID] FROM [Tags]"></asp:SqlDataSource>
        <br />
        <asp:TextBox ID="txtNewTags" runat="server" Width="353px"></asp:TextBox>
        <br />
        <asp:Button ID="btnAddNewTags" runat="server" OnClick="btnAddNewTags_Click" Text="Add new tags" />
        <br />
        <br />
        <br />
        <asp:GridView ID="grdComments" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
            </Columns>
        </asp:GridView>
        <br />
        Title:<br />
        <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
        <br />
        <br />
        Comment:<br />
        <asp:TextBox ID="txtComment" runat="server" Height="67px" TextMode="MultiLine" Width="320px"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="btnAddNewComment" runat="server"  Text="Add New Comment" OnClick="btnAddNewComment_Click" />
        <br />
        <br />
    </div>
</asp:Content>
